<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
EnumeratedRealDistribution (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="EnumeratedRealDistribution (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EnumeratedRealDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.html" title="class in org.apache.commons.math3.distribution"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/ExponentialDistribution.html" title="class in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/EnumeratedRealDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="EnumeratedRealDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.distribution</FONT>
<BR>
Class EnumeratedRealDistribution</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">org.apache.commons.math3.distribution.AbstractRealDistribution</A>
      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.distribution.EnumeratedRealDistribution</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution">RealDistribution</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>EnumeratedRealDistribution</B><DT>extends <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></DL>
</PRE>

<P>
<p>Implementation of a real-valued <A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedDistribution.html" title="class in org.apache.commons.math3.distribution"><CODE>EnumeratedDistribution</CODE></A>.

 <p>Values with zero-probability are allowed but they do not extend the
 support.<br/>
 Duplicate values are allowed. Probabilities of duplicate values are combined
 when computing cumulative probabilities and statistics.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>3.2</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: EnumeratedRealDistribution.java 1456769 2013-03-15 04:51:34Z psteitz $</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.math3.distribution.EnumeratedRealDistribution">Serialized Form</A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedDistribution.html" title="class in org.apache.commons.math3.distribution">EnumeratedDistribution</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#innerDistribution">innerDistribution</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedDistribution.html" title="class in org.apache.commons.math3.distribution"><CODE>EnumeratedDistribution</CODE></A> (using the <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang"><CODE>Double</CODE></A> wrapper)
 used to generate the pmf.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractRealDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#random">random</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#randomData">randomData</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#SOLVER_DEFAULT_ABSOLUTE_ACCURACY">SOLVER_DEFAULT_ABSOLUTE_ACCURACY</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#EnumeratedRealDistribution(double[], double[])">EnumeratedRealDistribution</A></B>(double[]&nbsp;singletons,
                           double[]&nbsp;probabilities)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a discrete distribution using the given probability mass function
 enumeration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#EnumeratedRealDistribution(org.apache.commons.math3.random.RandomGenerator, double[], double[])">EnumeratedRealDistribution</A></B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng,
                           double[]&nbsp;singletons,
                           double[]&nbsp;probabilities)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a discrete distribution using the given random number generator
 and probability mass function enumeration.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#cumulativeProbability(double)">cumulativeProbability</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#density(double)">density</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according to
 this distribution, this method returns <code>P(X = x)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#getNumericalMean()">getNumericalMean</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get the numerical value of the mean of this
 distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#getNumericalVariance()">getNumericalVariance</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get the numerical value of the variance of this
 distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#getSupportLowerBound()">getSupportLowerBound</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the lower bound of the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#getSupportUpperBound()">getSupportUpperBound</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the upper bound of the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#isSupportConnected()">isSupportConnected</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get information about whether the support is connected,
 i.e. whether all values between the lower and upper bound of the support
 are included in the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#isSupportLowerBoundInclusive()">isSupportLowerBoundInclusive</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether or not the lower bound of support is in the domain of the density
 function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#isSupportUpperBoundInclusive()">isSupportUpperBoundInclusive</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether or not the upper bound of support is in the domain of the density
 function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#probability(double)">probability</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X = x)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedRealDistribution.html#sample()">sample</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate a random value sampled from this distribution.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.math3.distribution.AbstractRealDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#cumulativeProbability(double, double)">cumulativeProbability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#getSolverAbsoluteAccuracy()">getSolverAbsoluteAccuracy</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#probability(double, double)">probability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#reseedRandomGenerator(long)">reseedRandomGenerator</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#sample(int)">sample</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="innerDistribution"><!-- --></A><H3>
innerDistribution</H3>
<PRE>
protected final <A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedDistribution.html" title="class in org.apache.commons.math3.distribution">EnumeratedDistribution</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</A>&gt; <B>innerDistribution</B></PRE>
<DL>
<DD><A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedDistribution.html" title="class in org.apache.commons.math3.distribution"><CODE>EnumeratedDistribution</CODE></A> (using the <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang"><CODE>Double</CODE></A> wrapper)
 used to generate the pmf.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="EnumeratedRealDistribution(double[], double[])"><!-- --></A><H3>
EnumeratedRealDistribution</H3>
<PRE>
public <B>EnumeratedRealDistribution</B>(double[]&nbsp;singletons,
                                  double[]&nbsp;probabilities)
                           throws <A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotFiniteNumberException.html" title="class in org.apache.commons.math3.exception">NotFiniteNumberException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotANumberException.html" title="class in org.apache.commons.math3.exception">NotANumberException</A></PRE>
<DL>
<DD>Create a discrete distribution using the given probability mass function
 enumeration.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>singletons</CODE> - array of random variable values.<DD><CODE>probabilities</CODE> - array of probabilities.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A></CODE> - if
 <code>singletons.length != probabilities.length</code>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A></CODE> - if any of the probabilities are negative.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotFiniteNumberException.html" title="class in org.apache.commons.math3.exception">NotFiniteNumberException</A></CODE> - if any of the probabilities are infinite.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotANumberException.html" title="class in org.apache.commons.math3.exception">NotANumberException</A></CODE> - if any of the probabilities are NaN.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</A></CODE> - all of the probabilities are 0.</DL>
</DL>
<HR>

<A NAME="EnumeratedRealDistribution(org.apache.commons.math3.random.RandomGenerator, double[], double[])"><!-- --></A><H3>
EnumeratedRealDistribution</H3>
<PRE>
public <B>EnumeratedRealDistribution</B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng,
                                  double[]&nbsp;singletons,
                                  double[]&nbsp;probabilities)
                           throws <A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotFiniteNumberException.html" title="class in org.apache.commons.math3.exception">NotFiniteNumberException</A>,
                                  <A HREF="../../../../../org/apache/commons/math3/exception/NotANumberException.html" title="class in org.apache.commons.math3.exception">NotANumberException</A></PRE>
<DL>
<DD>Create a discrete distribution using the given random number generator
 and probability mass function enumeration.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>rng</CODE> - random number generator.<DD><CODE>singletons</CODE> - array of random variable values.<DD><CODE>probabilities</CODE> - array of probabilities.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A></CODE> - if
 <code>singletons.length != probabilities.length</code>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</A></CODE> - if any of the probabilities are negative.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotFiniteNumberException.html" title="class in org.apache.commons.math3.exception">NotFiniteNumberException</A></CODE> - if any of the probabilities are infinite.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NotANumberException.html" title="class in org.apache.commons.math3.exception">NotANumberException</A></CODE> - if any of the probabilities are NaN.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</A></CODE> - all of the probabilities are 0.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="probability(double)"><!-- --></A><H3>
probability</H3>
<PRE>
public double <B>probability</B>(double&nbsp;x)</PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X = x)</code>. In other
 words, this method represents the probability mass function (PMF)
 for the distribution.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html#probability(double)">probability</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution">RealDistribution</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#probability(double)">probability</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the PMF is evaluated
<DT><B>Returns:</B><DD>zero.</DL>
</DD>
</DL>
<HR>

<A NAME="density(double)"><!-- --></A><H3>
density</H3>
<PRE>
public double <B>density</B>(double&nbsp;x)</PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according to
 this distribution, this method returns <code>P(X = x)</code>. In other words,
 this method represents the probability mass function (PMF) for the
 distribution.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the PMF is evaluated
<DT><B>Returns:</B><DD>the value of the probability mass function at point <code>x</code></DL>
</DD>
</DL>
<HR>

<A NAME="cumulativeProbability(double)"><!-- --></A><H3>
cumulativeProbability</H3>
<PRE>
public double <B>cumulativeProbability</B>(double&nbsp;x)</PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>. In other
 words, this method represents the (cumulative) distribution function
 (CDF) for this distribution.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the CDF is evaluated
<DT><B>Returns:</B><DD>the probability that a random variable with this
 distribution takes a value less than or equal to <code>x</code></DL>
</DD>
</DL>
<HR>

<A NAME="getNumericalMean()"><!-- --></A><H3>
getNumericalMean</H3>
<PRE>
public double <B>getNumericalMean</B>()</PRE>
<DL>
<DD>Use this method to get the numerical value of the mean of this
 distribution.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>sum(singletons[i] * probabilities[i])</code></DL>
</DD>
</DL>
<HR>

<A NAME="getNumericalVariance()"><!-- --></A><H3>
getNumericalVariance</H3>
<PRE>
public double <B>getNumericalVariance</B>()</PRE>
<DL>
<DD>Use this method to get the numerical value of the variance of this
 distribution.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>sum((singletons[i] - mean) ^ 2 * probabilities[i])</code></DL>
</DD>
</DL>
<HR>

<A NAME="getSupportLowerBound()"><!-- --></A><H3>
getSupportLowerBound</H3>
<PRE>
public double <B>getSupportLowerBound</B>()</PRE>
<DL>
<DD>Access the lower bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(0)</code>. In other words, this
 method must return
 <p><code>inf {x in R | P(X <= x) > 0}</code>.</p>

 Returns the lowest value with non-zero probability.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the lowest value with non-zero probability.</DL>
</DD>
</DL>
<HR>

<A NAME="getSupportUpperBound()"><!-- --></A><H3>
getSupportUpperBound</H3>
<PRE>
public double <B>getSupportUpperBound</B>()</PRE>
<DL>
<DD>Access the upper bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(1)</code>. In other words, this
 method must return
 <p><code>inf {x in R | P(X <= x) = 1}</code>.</p>

 Returns the highest value with non-zero probability.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the highest value with non-zero probability.</DL>
</DD>
</DL>
<HR>

<A NAME="isSupportLowerBoundInclusive()"><!-- --></A><H3>
isSupportLowerBoundInclusive</H3>
<PRE>
public boolean <B>isSupportLowerBoundInclusive</B>()</PRE>
<DL>
<DD>Whether or not the lower bound of support is in the domain of the density
 function.  Returns true iff <code>getSupporLowerBound()</code> is finite and
 <code>density(getSupportLowerBound())</code> returns a non-NaN, non-infinite
 value.

 The support of this distribution includes the lower bound.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code></DL>
</DD>
</DL>
<HR>

<A NAME="isSupportUpperBoundInclusive()"><!-- --></A><H3>
isSupportUpperBoundInclusive</H3>
<PRE>
public boolean <B>isSupportUpperBoundInclusive</B>()</PRE>
<DL>
<DD>Whether or not the upper bound of support is in the domain of the density
 function.  Returns true iff <code>getSupportUpperBound()</code> is finite and
 <code>density(getSupportUpperBound())</code> returns a non-NaN, non-infinite
 value.

 The support of this distribution includes the upper bound.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code></DL>
</DD>
</DL>
<HR>

<A NAME="isSupportConnected()"><!-- --></A><H3>
isSupportConnected</H3>
<PRE>
public boolean <B>isSupportConnected</B>()</PRE>
<DL>
<DD>Use this method to get information about whether the support is connected,
 i.e. whether all values between the lower and upper bound of the support
 are included in the support.

 The support of this distribution is connected.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code></DL>
</DD>
</DL>
<HR>

<A NAME="sample()"><!-- --></A><H3>
sample</H3>
<PRE>
public double <B>sample</B>()</PRE>
<DL>
<DD>Generate a random value sampled from this distribution.

 The default implementation uses the
 <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling">
 inversion method.
 </a>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html#sample()">sample</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution">RealDistribution</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#sample()">sample</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a random value.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EnumeratedRealDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.html" title="class in org.apache.commons.math3.distribution"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/ExponentialDistribution.html" title="class in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/EnumeratedRealDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="EnumeratedRealDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
